package cate.game.role.mall.refresh;


import cate.game.role.mall.refresh.impl.IFreeRefresh;
import cate.game.role.mall.refresh.impl.IPayRefresh;
import cate.game.role.mall.refresh.item.FreeRefreshItem;
import cate.game.role.mall.refresh.item.PayRefreshItem;
import cate.game.role.mall.refresh.item.RefreshItem;
import com.fasterxml.jackson.annotation.JsonProperty;
import easy.java.dev.note.NoteClass;

@NoteClass("只有免费和付费刷新")
public abstract class FreeAndPayRefresh implements IPayRefresh, IFreeRefresh {
    public FreeRefreshItem free;
    public PayRefreshItem pay;

    public FreeAndPayRefresh() {
        free = new FreeRefreshItem();
        pay = new PayRefreshItem();
    }

    @Override
    public RefreshItem getFreeRefreshItem() {
        return free;
    }

    @Override
    public RefreshItem getPayRefreshItem() {
        return pay;
    }

    @JsonProperty("payTimes")
    public int getPayTimes() {
        return pay.times;
    }

    @JsonProperty("lastPayRefreshTime")
    public long getLastPayRefreshTime() {
        return pay.lastRefreshTime;
    }

    @JsonProperty("freeTimes")
    public int getFreeTimes() {
        return free.times;
    }

    @JsonProperty("lastFreeRefreshTime")
    public long getLastFreeRefreshTime() {
        return free.lastRefreshTime;
    }
}
